#ifndef __LOG_H_
#define __LOG_H_

#include <stdio.h>
#include <stdint.h>
#define LOG_ERROR_LEVEL (0)
#define LOG_WARN_LEVEL  (1)
#define LOG_INFO_LEVEL  (2)
#define LOG_DBUG_LEVEL  (3)


#ifndef LOG_LEVEL
#define LOG_LEVEL (LOG_DBUG_LEVEL)
#endif

#if (LOG_LEVEL >= LOG_ERROR_LEVEL)
#define LOGE(fmt, ...) printf("[Error]:[%s]" fmt , __func__, ##__VA_ARGS__)
#else
#define LOGE(...)
#endif

#if (LOG_LEVEL >= LOG_WARN_LEVEL)
#define LOGW(fmt, ...) printf("[Warning]:[%s]" fmt , __func__, ##__VA_ARGS__)
#else
#define LOGW(...)
#endif

#if (LOG_LEVEL >= LOG_INFO_LEVEL)
#define LOGI(fmt, ...) printf("[Info]:[%s]" fmt , __func__, ##__VA_ARGS__)
#else
#define LOGI(...)
#endif

#if (LOG_LEVEL >= LOG_DBUG_LEVEL)
#define LOGD(fmt, ...) printf("[Debug]:[%s]" fmt , __func__, ##__VA_ARGS__)
#else
#define LOGD(...)
#endif

#endif/*
LOG H */
